import {request} from '../request';

const requestMenuPre = "/system/menu";

//
export function getMenuListByRoelId(roleId) {
	return request.get(
		requestMenuPre + "/getMenuListByRoelId/"+roleId
	);
}
export function menuTree() {
	return request.get(
		requestMenuPre + "/menuTree",
	);
}

export function menuTable(menuName,parentId) {
	return request.get(
		requestMenuPre + "/menuTable",
		{
			params: {
				menuName,
				parentId
			}
		}
	);
}

export function saveMenu(data) {
	return request.post(
		requestMenuPre + "/save",
		data
	);
}

export function updateMenu(data) {
	return request.post(
		requestMenuPre + "/update",
		data
	);
}
export function deleteMenu(menuId) {
	return request.delete(
		requestMenuPre+`/delete/${menuId}`
	);
}


export function menuDetailByMenuId(menuId) {
	return request.get(
		requestMenuPre+"/menuDetailByMenuId/"+menuId
	);
}




